//
//  JTRefreshHeader.m
//  百思不得姐
//
//  Created by Robin Zhang on 2017/1/6.
//  Copyright © 2017年 BeiJingWangDianJieTong. All rights reserved.
//

#import "JTRefreshHeader.h"

@interface JTRefreshHeader ()

/** logo */
@property (nonatomic, weak) UIImageView *logo;

@end

@implementation JTRefreshHeader

- (void)prepare {
    [super prepare];
    
    [self setAutomaticallyChangeAlpha:YES];
    
    [self.lastUpdatedTimeLabel setTextColor:[UIColor orangeColor]];
//    [self.arrowView setImage:[UIImage imageNamed:@"comment_bar_at_icon_click"]];
    
    /*
    [self setTitle:@"赶紧下拉吧" forState:MJRefreshStateIdle];
    [self setTitle:@"赶紧松开吧" forState:MJRefreshStatePulling];
    [self setTitle:@"正在加载数据..." forState:MJRefreshStateRefreshing];
     */
    
//    [self.lastUpdatedTimeLabel setHidden:YES];
//    [self.stateLabel setHidden:YES];
//    [self addSubview:[[UISwitch alloc] init]];
    
    UIImageView *logo = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"MainTitle"]];
    [self addSubview:logo];
    [self setLogo:logo];
}

/** 摆放子控件 */
- (void)placeSubviews {
    [super placeSubviews];
    
    [self.logo setJt_width:self.jt_width];
    [self.logo setJt_height:self.jt_height];
    
    [self.logo setJt_x:0];
    [self.logo setJt_y:-self.jt_height];
}

@end
